import type { Station } from '@/api/modules/esl/station';
import type { Rule } from 'ant-design-vue/es/form';

const formObj: Station = {
  stationId: '',
  stationNum: '',
  stationName: '',
  stationIp: '',
  mac: '',
  status: '',
  deptId: '',
  rangeTag: 0,
  sendTimes: 0,
  createTime: '',
  retainSend: 0,
};
export const form = ref({
  ...formObj,
});

export const formRef = ref();

export const resetForm = () => {
  form.value = {
    ...formObj,
  };
};
export const formRules: Record<keyof Station, Rule[]> = {
  stationId: [],
  stationNum: [],
  stationName: [],
  stationIp: [],
  mac: [],
  status: [],
  deptId: [],
  rangeTag: [],
  sendTimes: [],
  createTime: [],
  retainSend: [],
};
